Fix a gtk-builder-tool substitution.
authorArnaud Bonatti <arnaud.bonatti@gmail.com>
Sun, 12 Apr 2020 15:32:40 +0000 (17:32 +0200)
committerArnaud Bonatti <arnaud.bonatti@gmail.com>
Sun, 12 Apr 2020 17:28:29 +0000 (19:28 +0200)
The margin-left and margin-right properties have been
removed in favor of margin-start and margin-end ones.

gtk/tools/gtk-builder-tool-simplify.c

index 72b867f920b4ec543d3a9bb2485f7e83bdceca06..ce066e31f4156a9ecf1382c2a6d4c077e90827f8 100644 (file)
@@ -726,9 +726,10 @@ maybe_rename_property (Element *element, MyParserData *data)
     const char *new_name;
     const char *alt_names[3];
   } props[] = {
+    /* the "replacement" property is placed *after* the "added" properties */
     { "GtkPopover", "modal", GTK_TYPE_POPOVER, PROP_KIND_OBJECT, "autohide", { NULL, NULL, NULL } },
-    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "hexpand", { "vexpand", NULL, NULL } },
-    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-left", { "margin-top", "margin-right", "margin-bottom" } },
+    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "vexpand", { "hexpand", NULL, NULL } },
+    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-bottom", { "margin-start", "margin-end", "margin-top" } },
     { "GtkHeaderBar", "show-close-button", GTK_TYPE_HEADER_BAR, PROP_KIND_OBJECT, "show-title-buttons", { NULL, NULL, NULL } }
   };
   int i, k, l;